<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改缴费信息')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-pay-edit" th:object="${payInfo}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">支付号码：</label>
                <div class="col-sm-8">
                    <input name="payId" th:field="*{payId}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">账单所属业主：</label>
                <div class="col-sm-8">
                    <input name="payResidentId" th:field="*{payResidentId}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">费用名称：</label>
                <div class="col-sm-8">
                    <input name="payFeeName" th:field="*{payFeeName}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">费用价格：</label>
                <div class="col-sm-8">
                    <input name="payFeePrice" th:field="*{payFeePrice}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">支付日期：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="payDate" th:value="${#dates.format(payInfo.payDate, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">欠费金额：</label>
                <div class="col-sm-8">
                    <input name="payArrears" th:field="*{payArrears}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">支付状态：</label>
                <div class="col-sm-8">
                    <select name="payStatus" class="form-control m-b" th:with="type=${@dict.getType('pay_status')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{payStatus}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">费用类型：</label>
                <div class="col-sm-8">
                    <select name="patyType" class="form-control m-b" th:with="type=${@dict.getType('pay_type')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{patyType}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">费用所属小区：</label>
                <div class="col-sm-8">
                    <select name="payCourtId" class="form-control m-b">
                        <option th:each="court : ${courtList}" th:text="${court.courtName}" th:value="${court.id}" th:field="*{payCourtId}"></option>
                    </select>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "property/pay";
        $("#form-pay-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-pay-edit').serialize());
            }
        }

        $("input[name='payDate']").datetimepicker({
            format: "yyyy-mm-dd hh:ii:ss",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>